$(document).ready(function () {

    initTopSwiper()
    initSwiperMenu()


})

function initTopSwiper(){
     var swiper = new Swiper ('#topSwiper', {
        loop: true,
        autoplay:3000,
        direction:'horizontal',
        // 如果需要分页器
        pagination: '.swiper-pagination',
        // 如果需要前进后退按钮

  })
}

function initSwiperMenu(){
    var swiper =new Swiper('#swiperMenu',{
        loop: true,
        autoplay:5000,
        direction:'horizontal',
        slidesPerView:3,
    })

}